13. Creating a PPP LINK Script

13.1 General

The connection script editor is available through Options/PPP Link, and selecting the Script tab. It allows 12 lines : 6 for receive messages and 6 for strings to send. This should be more than enough to connect to an ISP. The script serves mainly for authentification in a text login mode, but sometimes even a PAP or CHAP authentification requires a connection code to be entered.

There are some keywords to symbolically replace variable data that may need to be processed. By separating these from the script itself, it is possible to exchange and distribute user defined scripts for various ISPs without the need of removing personal information.

%l

Login:

replaces the user name

%p

Password:

replaces the password

%r

Return:

sends a carriage return

%w

Wait:

waits for 2 seconds

These keywords only work if they are alon on the line. If they are mixed with text they will fail to operate. Section 13.7 covers use of keywords in fuller detail.

13.2 Preparation

For a new script to be successful, you should use a terminal emulation program such as Connect, Rufus or Starcall. Run the terminal program.

In the following text, keyboard input is written as:

    COMMAND STRING
And answers are written as:
    MODEM RESPONSE

First you must ensure that the modem is responding. A simple call is enough, but it might not respond to the first request. If this is the case, try again. If it still doesn't respond, check your connections. Section 4, chapter 4 covers various problems that might accur with a modem, and how to solve them.
    AT
    OK

Next, try a reinitialisation test. The modem's speaker might crackle.
    ATZ
    OK

If you have to enter a specific initialisation string for your modem, now is the time to do so. This can be useful to set the speed or to select the type of responses sent back by your modem. For example, if you have a Rockwell chipset based modem, the command ATQ0V1W1X4 will set the required parameters for Wen.Suite.
    Q0: Display status messages
    V1: Alphabetic status messages
    W1: Transmit line speed (CARRIER) and interface speed (CONNECT)
    X4: Detect tones and display all messages

13.3 Connection

Now dial the POP access point provided by your ISP. Let's assume that the number is 0123456789. The command will be:

    ATD0123456789

Your modem unhooks and dials the phone number. You should hear the ring tone and the distant modem answers. Bothe modems should then start negociating transmission speed and the compression protocole. Once this is over, the speaker should cutoff and several messages will be displayed by the modem.
    CARRIER 28800 PROTOCOL LAP-M CONNECT 115200

Depending on your modem's configuration, some messages may not be displayed or may be replaced by others. In any case, the CONNECT message should be displayed, indicating that the modem linkup has been established.

From this moment, the dialog is no longer between you and your modem, but between you and the distant server located at your ISP's premises which is in charge of your connection to the Internet.

13.4 First Case

No message is displayed, or the messages are unintelligible like:

    ~_}#}5}g8}5 az}e}k5}d~

Such messages are repeated at a regular interval. Your ISP will probably end up disconnecting you. Otherwise, switch off the modem or hangup by sending ATH (refer to section 13.6 or chapter 12 to learn how to hang up a connection). If you are in this case, your provider is making an immediate PPP connection. You can disconnect and jump to section 13.7.

13.5 Second Case

After a while, you will receive a welcome message, such as:

    Welcome to PROVIDER

Then you will probably be asked your username:
    Login:

Answer with the login that was provided by your ISP. Let's imagine it is "jSmith":
    JSmith

After this, you will be prompted for your password, say "abcdefgh":
    Password:
    {nothing}

The {nothing} answer is because for most providers there is no echo on password imput, so that if somebody is sitting next to you, they won't see what have typed. Some providers return an asterisk "*" for each character.

Finally, some rare providers offer both a PPP or SLIP connection. If you have such a choice, choose the PPP protocol.

    Protocol:
    PPP

At this point the PPP link should be established. You should get the same weird printouts as in section 13.4.

Of course, all the messages described above are only examples that can vary largely between ISPs and server software. Write down everything in order to write the script. You can now disconnect (either by switching off the modem, or by using the ATH command as described in section 15).

13.6 Direct PPP Connection

It is also possible that the welcome message is used to go directly to PPP. In this case, a keyword given by your provider must be sent. However, providers with a Login/Password connection are now progressively switching to a direct PPP connection. In this case there is no need for a connection script.

In all cases when a Login and Password are not entered in text mode, the authentification will be done through a PAP or CHAP protocole during PPP Link's IP Configuration. A message such as Refused Authentification might be displayed, indicating a problem with the Login or Password.

13.7 Creating the Script

If your provider refuses a direct PPP connection, it will be necessary to make a script. After having written down all the dialog between you are your provider (taking careful note of upper/lower case and punctuation), you have everything you need to write the script.

The script recapitulates all the exchanges between the modem connection (therefore after the CONNECT, CARRIER and PROTOCOL messages) and the switch to PPP mode.

Note the messages that you have sent to the provider, these will have to be typed in entirely. Also, note the last significant characters received from the provider. For these you only need the last characters, but enough to avoid any confusion with other portions of text. One word is enough, or even some letters.

This is an example of what a script might look like after being simplified as above:

1

Receive

ogin:

Send

%l

2

Receive

word:

Send

%p

3

Receive

tocol:

Send

ppp

Text from the initial dialog has been reduced. We have only kept 4 significant letter of the received text. The login has been replaced with the keyword "%l" and the password with "%p". Do not omit to check lower/upper case differences. Enter your login and password in Options/ PPP Link under the Connection tab in the Login and Password fields. This is where PPP Link will get them when "%l" and "%p" are used.